const Mock = require("mockjs");

const Random = Mock.Random;
module.exports = [
  //获取用户信息
  {
    url: "/api/user/info",
    method: "get",
    response: () => {
      return {
        errno: 0,

        data: {
          username: Random.title(),
          nickname: Random.cname(),
        },
      };
    },
  },
  //登陆
  {
    url: "/api/user/login",
    method: "post",
    response: () => {
      return {
        errno: 0,
        data: {
          token: Random.string(32),
        },
      };
    },
  },
  //注册
  {
    url: "/api/user/register",
    method: "post",
    response: () => {
      return {
        errno: 0,
        // data: {
        //   token: Random.string(32),
        // },
      };
    },
  },
];
